﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SpikedBallCtl_Ball : MonoBehaviour
{

    SpikedBallCtl ctl;

    void Start()
    {
        ctl = GetComponentInParent<SpikedBallCtl>();
    }

    private void OnCollisionEnter2D(Collision2D collision)
    {
        if (collision.gameObject.CompareTag(GameManager.Instance.PlayerTag))
        {
            ctl.OnTouchBall(collision.transform.position.x);
        }
    }
}
